//
//  OperationTableCell.m
//  HealthA段
//
//  Created by MrJXT on 15/6/10.
//  Copyright (c) 2015年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "OperationTableCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation OperationTableCell
- (void)dealloc
{
    [_countLabel release];
    [_departLabel release];
    [_placeLabel release];
    [_namelabel release];
    [_picView release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.namelabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.namelabel];
        [_namelabel release];
        
        self.departLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.departLabel];
        [_departLabel release];
        
        self.placeLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.placeLabel];
        [_placeLabel release];
        
        self.countLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.countLabel];
        [_countLabel release];
        
        self.picView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.picView];
        [_picView release];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.namelabel.frame = CGRectMake(10, 5, WIDTH - 20, 40);
    self.namelabel.font = [UIFont systemFontOfSize:24];
    self.namelabel.textAlignment = NSTextAlignmentLeft;
    
    self.countLabel.frame = CGRectMake(5, 65, 100, 20);
    self.countLabel.font = [UIFont systemFontOfSize:14];
    
    self.departLabel.frame = CGRectMake(5, 125, 140, 20);
    self.departLabel.font = [UIFont systemFontOfSize:14];
    
    self.placeLabel.frame = CGRectMake(5, 95, 140, 20);
    self.placeLabel.font = [UIFont systemFontOfSize:14];
    
    self.picView.frame = CGRectMake(160, 50, WIDTH - 180, 105);
    self.picView.layer.borderWidth = 1;
    self.picView.layer.cornerRadius = 18;
    self.picView.layer.masksToBounds = YES;
    self.picView.layer.borderColor = [UIColor clearColor].CGColor;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
